﻿@model IEnumerable<ViVa.ActiveDirectory.Links>

@{
    ViewBag.Title = "Admin page";
}           


   @Html.Partial("~/Views/Log/_AddLogChange.cshtml")

   <br />
<table>
<tr>

<td style="vertical-align:top;">
<table>
        <tr>
            <th colspan="2" style="background-color: #DDDDDD; text-align: left; padding: 5px;">Interne Sites:</th>
            <th style="background-color: #DDDDDD; text-align: right; padding: 5px; font-weight: normal; font-style: italic; border-color: whitesmoke;"><a href="@Url.Action("voegLinkToe", "Admin", new { link_Type = "InterneSite" })">Voeg link toe</a></th>
        </tr>

        @foreach (ViVa.ActiveDirectory.Links link in @Model)
        {
            if (link.Link_Type.Trim() == "InterneSite")
            {
            <tr>
                <td style="width: 15px;"><a href="@Url.Action("verwijderLink", "Admin", link)"><div class="DeleteButton" title="Verwijder link..." onclick="if (!confirm('Verwijder deze link?')) return false">&nbsp</div></a> &nbsp</td>
                <td style="width:145px"><a href="@link.Link_Url" target="_blank">@link.Naam</a></td>
                <td>@link.Omschrijving &nbsp</td>
            </tr>
            }
        }
</table>

</td>
<td>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
<td style="vertical-align:top">

<table>
        <tr>
            <th colspan="2" style="background-color: #DDDDDD; text-align: left; padding: 5px;">Externe Sites:</th>
            <th style="background-color: #DDDDDD; text-align: right; padding: 5px; font-weight: normal; font-style: italic; border-color: whitesmoke;"><a href="@Url.Action("voegLinkToe", "Admin", new { link_Type = "ExterneSite" })">Voeg link toe</a></th>
        </tr>

        @foreach (ViVa.ActiveDirectory.Links link in @Model)
        {
            if (link.Link_Type.Trim() == "ExterneSite")
            {
            <tr>
                <td style="width: 15px;"><a href="@Url.Action("verwijderLink", "Admin", link)"><div class="DeleteButton" title="Verwijder link..." onclick="if (!confirm('Verwijder deze link?')) return false">&nbsp</div></a> &nbsp</td>
                <td style="width:145px"><a href="@link.Link_Url" target="_blank">@link.Naam</a></td>
                <td>@link.Omschrijving &nbsp</td>
            </tr>
            }
        }
</table>

</td>
</tr>
</table>